/*
 * 
 *
 * 
 */
package com.hboxs.asl.dao;

import com.hboxs.asl.entity.Member;
import com.hboxs.asl.entity.Product;
import com.hboxs.asl.entity.ViewHistory;

import java.util.List;

/**
* Dao - 商品浏览记录
*/
public interface ViewHistoryDao extends BaseDao<ViewHistory, Long> {

    /**
     * 判断对应的会员以及商品的浏览记录是否存在
     * @param member
     * @param product
     * @return
     */
    boolean historyExists(Member member, Product product);

    /**
     * 获取相应会员和商品的浏览记录
     * @param member
     * @param product
     * @return
     */
    ViewHistory getViewHistory(Member member, Product product);

    /**
     * 获取某会员的商品浏览记录
     * @param member
     * @return
     */
    List<ViewHistory> getMyViewHistory(Member member);
}
